package com.xdtech.trans.service;

import java.util.List;

import com.xdtech.common.service.IBaseService;
import com.xdtech.sys.vo.UserItem;
import com.xdtech.trans.model.Person;
import com.xdtech.trans.vo.PersonItem;

/**
 * 
 * @author max.zheng
 * @create 2015-05-28 00:20:05
 * @since 1.0
 * @see
 */
public interface PersonService extends IBaseService<Person>{

	/**
	 * 保存更新信息
	 * @author max.zheng
	 * @create 2015-05-28 00:20:05
	 * @modified by
	 * @param item
	 * @return
	 */
	boolean saveOrUpdatePerson(PersonItem item);

	/**
	 * 加载记录信息
	 * @author max.zheng
	 * @create 2015-05-28 00:20:05
	 * @modified by
	 * @param newId
	 * @return
	 */
	PersonItem loadPersonItem(Long personId);

	/**
	 * 根据id号删除记录信息
	 * @author max.zheng
	 * @create 2015-05-28 00:20:05
	 * @modified by
	 * @param id
	 * @return
	 */
	boolean deletePersonInfo(long id);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-05-28 00:20:05
	 * @modified by
	 * @param personIds
	 */
	boolean deletePersonInfo(List<Long> personIds);
	
	/**
	 * 加载vo列表条目
	 * @author max.zheng
	 * @create 2015-05-28 00:20:05
	 * @modified by
	 * @return
	 */
	List<PersonItem> loadItems();

	/**
	 * APP用户登录认证
	 * @author max.zheng
	 * @create 2015-7-4下午11:23:01
	 * @modified by
	 * @param username
	 * @param password
	 * @return
	 */
	PersonItem loginCheck(String username, String password);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-7-10下午9:34:19
	 * @modified by
	 * @param id
	 * @return
	 */
	PersonItem getPersonItem(Long id);

	/**
	 * 根据当前登录用户过滤 所在网点下的业务员
	 * @author max.zheng
	 * @create 2015-7-21下午11:09:26
	 * @modified by
	 * @param webId
	 * @return
	 */
	List<Person> getPersonsByCurrentWebsite(Long webId);
}
